#include"Slist.h"

void Slisttext01()
{
	SLTNode* phead = (SLTNode*)malloc(sizeof(SLTNode));
	SLTNode* node1 = (SLTNode*)malloc(sizeof(SLTNode));
	SLTNode* node2 = (SLTNode*)malloc(sizeof(SLTNode));
	SLTNode* node3 = (SLTNode*)malloc(sizeof(SLTNode));

	phead->data = 1;
	node1->data = 2;
	node2->data = 3;
	node3->data = 4;

	phead->next = node1;
	node1->next = node2;
	node2->next = node3;
	node3->next = NULL;
	SLTPushBack(&phead, 5);
	SLTPushFront(&phead, 0);
	SLTPrint(phead);
	SLTPopBack(&phead);
	SLTPrint(phead);
	SLTPopFront(&phead);
	SLTPrint(phead);
	SLTInsert(&phead, node2, 45);
	SLTInsertAfter(node1, 23);
	SLTPrint(phead);
}
int main()
{
	Slisttext01();
	return 0;
}